#include <bits/stdc++.h>
#define re register
#define int long long
#define Add(a,b) (((a) + (b)) % mod)
#define Sub(a,b) (((a) - (b) + mod) % mod)
#define Mul(a,b) ((a) * (b) % mod)
#define chAdd(a,b) (a = Add(a,b))
#define chSub(a,b) (a = Sub(a,b))
#define chMul(a,b) (a = Mul(a,b))

using namespace std;

const int N = 3e6 + 10;
const int mod = 998244353;
int n,m,q,k,ans;
int fac[N],infac[N];

inline int read(){
    int r = 0,w = 1;
    char c = getchar();
    while (c < '0' || c > '9'){
        if (c == '-') w = -1;
        c = getchar();
    }
    while (c >= '0' && c <= '9'){
        r = (r << 3) + (r << 1) + (c ^ 48);
        c = getchar();
    }
    return r * w;
}

inline int qmi(int a,int b){
    int res = 1;
    while (b){
        if (b & 1) chMul(res,a);
        chMul(a,a); b >>= 1;
    } return res;
}

inline void init(int n){
    fac[0] = 1;
    for (re int i = 1;i <= n;i++) fac[i] = Mul(fac[i - 1],i);
    infac[n] = qmi(fac[n],mod - 2);
    for (re int i = n - 1;~i;i--) infac[i] = Mul(infac[i + 1],i + 1);
}

inline int C(int n,int m){
    if (n < m) return 0;
    else return Mul(fac[n],Mul(infac[m],infac[n - m]));
}

signed main(){
    freopen("sequence.in","r",stdin);
    freopen("sequence.out","w",stdout);
    n = read(),m = read(),q = read(),k = read();
    if (q < m) return puts("0"),0;
    init(m);
    for (re int i = 0;i <= m;i++){
        int tmp = Mul(C(m,i),qmi(n - i,q));
        if (i & 1) chSub(ans,tmp);
        else chAdd(ans,tmp);
    } printf("%lld",Mul(Mul(n - m + 1,qmi(k,q - m)),ans));
    return 0;
}